import BuffUtil from '@/BuffUtil';
import AbilityBase from 'code/Scripts/Abilities/base/AbilityBase';
/**
 * 噬血狂攻
 **/
export default class BossSpell_BloodLust extends AbilityBase {
    static instance: BossSpell_BloodLust;
    buffType: AppBuffType = {
        id: 'buff_BossSpell_BloodLust',
        art: this.art,
        name: this.abilityName,
        ubertip: this.ubertip,
        attribute: {
            attackSpd_p: 3,
            move_speed: 250,
        },
        targetAttach: 'left hand',
        targetArt: 'Abilities\\Spells\\Orc\\Bloodlust\\BloodlustTarget.mdl',
        dur: 12,
    };
    constructor(id: string = 'Azz1') {
        super(id);
        BossSpell_BloodLust.instance = this;
        this.init();
        se.onUnitSpellEffect(this.onSpellEffect.bind(this), this.id);
    }
    init() {
        BuffUtil.registerBuffType(this.buffType);
    }
    cast<T extends Object = any>(tarX: number, tarY: number, source: unit, target: unit, data?: T): void {
        BossAbilityManagerInstance.text('噬血狂攻', source);
        BuffUtil.addBuff(source, this.buffType.id, source);
    }
    onSpellEffect() {
        this.cast(GetSpellTargetX(), GetSpellTargetY(), GetTriggerUnit(), GetSpellTargetUnit());
    }
}
